<?php
include_once("../../DataProvider.php");
if(isset($_POST["cate"]))
{
	$cate = $_POST["cate"];
	$sql = "insert into tbl_categories (categories) values ('$cate')";
	$result = DataProvider::ExecuteQuery($sql);
	if($result)
	{
		header("Location: ../categories.php");
	}
	else
	{
		echo "<a>error<a>";
		}

}
else
{
	header("Location: ../categories.php");
}
?>